/*
 * CommentNode.h
 *
 *  Created on: 2010-6-5
 *      Author: Guobc
 */

#ifndef COMMENTNODE_H_
#define COMMENTNODE_H_

#include "Comment.h"

namespace HA {
class CommentNode: public Comment {
public:

	CommentNode();

	CommentNode(string comment);

	inline void setText(const string& text) {
		mComment = text;
	}

	inline string getText(){
		return toHTML();
	}

	inline string toHTML(){
		return "<!--" + mComment + "-->";
	}

	inline ASTNode* newInstance() const {
		return new CommentNode();
	}

private:
	string mComment;
};
}

#endif /* COMMENTNODE_H_ */
